Skip to content

Commit 9756534

Browse files
authored
Update example
1 parent 66e0312 commit 9756534

File tree

1 file changed

+2
-1
lines changed
  • files/en-us/mozilla/add-ons/webextensions/api/webrequest/streamfilter/ondata

1 file changed

+2
-1
lines changed

files/en-us/mozilla/add-ons/webextensions/api/webrequest/streamfilter/ondata/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ function listener(details) {
424424

425425
// Check if the end of the data looks like "<h1>Exampl"
426426
const n = data.length;
427-
mainLoop: for (let i = n - 1, l = n - bytes.length; i > l; i--) {
427+
const m = bytes.length;
428+
mainLoop: for (let i = n - 1, l = n - m; i > l; i--) {
428429
if (bytes[0] === data[i]) {
429430
const initial = i;
430431
for (let j = 1, l = n - i; j < l; j++) {

0 commit comments

Comments
 (0)